export const novelCreatePage = {
  name: 'NovelCreate',
  path: '/novel/create',
  component: () => import('@/pages/novel/create/NovelCreatePage.vue'),
  meta: {
    auth: 'user',
  },
} as const;

export const novelTocPage = {
  name: 'NovelToc',
  path: '/novel/:id',
  component: () => import('@/pages/novel/detail/NovelDetailPage.vue'),
  meta: {
    auth: 'guest',
  },
} as const;

export const novelChapterPage = {
  name: 'NovelChapter',
  path: '/novel/:nid/chapter/:cid',
  component: () => import('@/pages/novel/chapter/NovelChapterPage.vue'),
  meta: {
    auth: 'guest',
  },
} as const;

export const novelEditPage = {
  name: 'NovelEdit',
  path: '/novel/:nid/chapter/:cid/edit',
  component: () => import('@/pages/novel/edit/NovelEditPage.vue'),
  meta: {
    auth: 'user',
  },
} as const;

const novelRoutes = [
  novelCreatePage,
  novelTocPage,
  novelChapterPage,
  novelEditPage,
];

export default novelRoutes;
